package cn.wondertek.common.constant;

/**
 * 认证常量
 * author
 * 2020年1月16日
 */
public class AuthConstant {

    public static final String LOGIN_SALT = "";

    /**
     * request请求头属性
     */
    public static final String REQUEST_AUTH_HEADER="Authorization";

    /**
     * JWT-account
     */
    public static final String USER_NAME = "userName";

    /**
     * 组织ID
     */
    public static final String ORG_ID_TOKEN = "orgIdToken";

    /**
     * Shiro redis 前缀
     */
    public static final String PREFIX_SHIRO_CACHE = "hubnetsoft-erp:cache:";

    /**
     * redis-key-前缀-shiro:refresh_token
     */
    public final static String PREFIX_SHIRO_REFRESH_TOKEN = "hubnetsoft-erp:refresh_token:";

    /**
     * redis-key-前缀-shiro:refresh_check
     */
    public final static String PREFIX_SHIRO_REFRESH_CHECK = "story:refresh_check:";

    /**
     * JWT-currentTimeMillis
     */
    public final static String CURRENT_TIME_MILLIS = "currentTimeMillis";

    //获取条线的角色标识
    public static final String ERP_ROLE_BL = "jr_scm_bl";
    //获取组织的角色标识
    public static final String ERP_ROLE_ORG = "jr_scm_org";

    public static final String USER_ID = "userId";

    /**********************通用代码 end***********************/

    /**
     * 过期时间
     */
    public static class ExpireTime {
        private ExpireTime() {
        }
        public static final int TEN_SEC =  1000 * 10;//10s
        public static final int THIRTY_SEC = 1000 * 30;//30s
        public static final int ONE_MINUTE = 1000 * 60;//一分钟
        public static final int THIRTY_MINUTES = 1000 * 60 * 30;//30分钟
        public static final int THREE_MINUTES = 1000 * 60 * 3;//3分钟
        public static final int ONE_HOUR =1000 * 60 * 60;//一小时
        public static final int THREE_HOURS = 1000 * 60 * 60 * 3;//三小时
        public static final int TWELVE_HOURS = 1000 *  60 * 60 * 12;//十二小时，单位s
        public static final int ONE_DAY = 1000 * 60 * 60 * 24;//二十四小时
    }

}
